package arina.university.model;

/**
 * Created with IntelliJ IDEA.
 * User: user
 * Date: 15.11.13
 * Time: 13:55
 * To change this template use File | Settings | File Templates.
 */
public class Student {
    private String name;
    private int id;
    private String enterDate;

    public Student(String name, int id, String enterDate) {
        this.name = name;
        this.id = id;
        this.enterDate = enterDate;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null) {
            return false;
        }
        if (!(o instanceof Student)) {
            return false;
        }
        Student student = (Student) o;
        return id == student.id;
    }

    @Override
    public int hashCode() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setEnterDate(String enterDate) {
        this.enterDate = enterDate;
    }

    public String getName() {
        return name;
    }

    public int getId() {
        return id;
    }

    public String getDate() {
        return enterDate;
    }
}
